<template>
  <div class="info-content">
    <van-nav-bar class="info-nav" left-arrow fixed placeholder title="信息登记" :border="false" @click-left="onClickLeft" />
    <div class="info-con">
      <div v-for="(item,index) in navList" :key="index" class="info-every" @click="clickBtn(item)">
        <div class="every-one">
          <img :src="'../../static/info/info'+index+'.png'" alt="" />
        </div>
        <div class="every-two">
          <div>{{ item.name }}</div>
        </div>
        <div class="every-three">
          <van-icon name="arrow" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>

export default {
  data() {
    return {
      navList: [
        { name: '综合部' },
        { name: '销售部' },
        { name: '商务部' },
        { name: '研发部' },
        { name: '运维部' },
      ],
    }
  },
  methods: {
    // 返回上一级
    onClickLeft() {
      uni.navigateBack() // 直接使用 navigateBack
    },
    clickBtn(item) {
      if (item.name === '研发部') {
        uni.navigateTo({
          url: `/package-guest/pages/info-regist/index?name=${item.value}`,
        })
      }
    },
  },
}
</script>

<style lang="scss" scoped>
.info-content{
    width:100%;
    height:200px;
    margin-top: 10px;
    .info-con{
        display: flex;
        flex-flow: column;
        align-items: center;
        .info-every{
            width:93%;
            height:46px;
            box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.06);
            border-radius: 2px;
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            .every-one{
                width: 15%;
                display: flex;
                align-items: center;
                justify-content: center;
                img{
                    width:24px;
                    height:24px;
                }
            }
            .every-two{
                width: 70%;
                padding-left: 10px;
            }
            .every-three{
                width: 15%;
                text-align: center;
                van-icon{
                    font-size: 10px;
                    width: 12px;
                    height: 12px;
                    background: #f2f2f2;
                    border-radius: 6px;
                    color: #ccc;
                }
            }

        }

    }
}
  </style>
<style lang="scss">
.info-content{
    .van-nav-bar{
        box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.06);
    }
}
</style>
